﻿// Tools_Chart_Dlg.cpp: 实现文件
//

#include "pch.h"
#include "SakerProject.h"
#include "Tools_Chart_Dlg.h"
#include "afxdialogex.h"

#include "mmShowChart.h"

// CTools_Chart_Dlg 对话框
CTools_Chart_Dlg m_Tools_Chart;

IMPLEMENT_DYNAMIC(CTools_Chart_Dlg, CDialogEx)

CTools_Chart_Dlg::CTools_Chart_Dlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_Tools_Chart, pParent)
{

}

CTools_Chart_Dlg::~CTools_Chart_Dlg()
{
}

void CTools_Chart_Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CTools_Chart_Dlg, CDialogEx)
	ON_WM_SIZE()
END_MESSAGE_MAP()


// CTools_Chart_Dlg 消息处理程序


BOOL CTools_Chart_Dlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	vecWidgetRects = xx::GetWidgetRects(this);

	return TRUE;
}

void CTools_Chart_Dlg::OnSize(UINT nType, int cx, int cy)
{
	CDialogEx::OnSize(nType, cx, cy);

	if (nType == SIZE_RESTORED || nType == SIZE_MAXIMIZED)//窗体大小发生变动。处理程序
	{
		if (vecWidgetRects.size() != 0) {
			xx::ResizeWindow(this, vecWidgetRects);
		}
		if (iiProject.Flag_InitSystem == false) {

			mmShowChart.ShowCurrent();
		}
	}
	//Invalidate();//更新窗口
}

